const db = uniCloud.database()

exports.main = async (event, context) => {
	const {
		detail: {
			_id,
			title,
			author,
			content
		},
		picUrls
	} = event
	const collection = db.collection('article')
	const res = await collection.doc(_id).update({
		title,
		author,
		content,
		picUrls
	})
	return res
};